<template>
	<view class="list">
		<view class="syspadding navbar">
			<view class="navbarh acea-row row-between-wrapper">
				<view class="acea-row row-middle backbtn" @click="back">
					<image class="back" src="../../static/images/back.png" mode="aspectFit"></image>
					<text style="margin-left: -10rpx;">返回</text>
				</view>
				<view class="fs-34">收入纳税明细查询</view>
				<view class="backbtn">批量申诉</view>
			</view>
		</view>
		<view style="width: 100%;height: 170rpx;"></view>
		
		<view class="all-nav">
			<view style="width: 100%;height: 30rpx;background-color: #f5f5f5;"></view>
			<view style="padding: 30rpx;">
				<view class="item acea-row row-between-wrapper" style="padding-bottom: 15rpx;">
					<view class="acea-row row-middle">
						<text>收入合计</text>
						<image class="wenhao" src="https://gerensuodeshui.oss-cn-hangzhou.aliyuncs.com/wenhao.png" mode="aspectFit"></image>
						<text>：</text>
					</view>
					<view>{{zongPrice}}元</view>
				</view>
				<view class="item acea-row row-between-wrapper" style="padding-top: 15rpx;">
					<view>已申报税额合计：</view>
					<view>{{yijiaoPrice}}元</view>
				</view>
			</view>
		</view>
		
		<view class="main">
			<block v-for="(item,index) in list" :key="index">
				<view class="item" @click="detailclick(item.id)">
					<view class="acea-row row-between-wrapper fs-30">
						<view>{{ item.shuiwuTitle }}</view>
						<view style="margin-right: 60rpx;">{{ item.date }}</view>
					</view>
					<view class="fc-888 mt-15 fs-28">所得项目小类：{{ item.shuiwuType }}</view>
					<view class="acea-row row-between-wrapper fs-28 fc-888 mt-15">
						<view class="line1" style="width: 550rpx;">扣款义务人：{{ item.group_name }}</view>
						<view class="iconfont icon-xiangyou fc-888"></view>
					</view>
					<view class="fc-888 mt-15 fs-28">收入：{{ item.price}}元</view>
					<view class="fc-888 mt-15 fs-28">已申报税额：{{ item.benPrice }}元</view>
				</view>
			</block>
		</view>
		
	</view>
</template>

<script>
	import { yearDetails } from '@/api/user.js'
	export default {
		data() {
			return {
				id :'',
				list:[],
				yijiaoPrice:'0.00',
				zongPrice:'0.00',
			};
		},
		onLoad(options) {
			this.id = options.id;	
			this.getlist();
		},
		methods:{
			getlist(){
				let that = this;
				yearDetails({ group_year_id:that.id }).then(res=>{
					that.list = res.data.data
					that.yijiaoPrice = res.data.yijiaoPrice || 0.00;
					that.zongPrice = res.data.zongPrice || 0.00;
				}).catch(err=>{
					
				})
			},
			detailclick(id){
				uni.navigateTo({
					url:'/pages/index/bill_details?id='+id
				})
			},
			back(){
				uni.navigateBack();
			}
		}
	}
</script>

<style lang="scss">
	.list{
		
		.main{
			width: 100%;
			margin-top: 220rpx;
			
			.item{
				background-color: #fff;
				margin-bottom: 30rpx;
				padding: 30rpx;
				
			}
		}
		
		.all-nav{
			width: 100%;
			background-color: #ffffff;
			position: fixed;
			top: 160rpx;
			left: 0;
			right: 0;
			
			.item{
				width: 100%;
					
				.wenhao{
					width: 30rpx;
					height: 30rpx;
					margin: 0 10rpx;
				}
			}
			.item~.item{
				border-top: 1rpx solid #f2f2f2;
			}
		}
		
		.navbar{
			position: fixed;
			top: 0;
			left: 0;
			right: 0;
			width: 100vw;
			background-color: #ffffff;
			
			.navbarh{
				width: 100%;
				height: 100rpx;
				padding: 0 30rpx;
				
				.backbtn{
					color: #5186E6;
					width: 150rpx;
				}
				.back{
					width: 60rpx;
					height: 60rpx;
					margin-left: -20rpx;
				}
			}
		}
		
	}
</style>
